//
//  YiDongWebViewModel.m
//  ITHome
//
//  Created by lanou3g on 15/7/17.
//  Copyright (c) 2015年 YAX. All rights reserved.
//

#import "YiDongWebViewModel.h"
#import "YiDongImgModel.h"

@implementation YiDongWebViewModel
+ (instancetype)modelWithDict:(NSDictionary *)dict
{
    YiDongWebViewModel *model = [[self alloc]init];
    model.title = dict[@"title"];
    model.ptime = dict[@"ptime"];
    model.body = dict[@"body"];
    NSArray *imgArray = dict[@"img"];
    NSMutableArray *temArray = [NSMutableArray arrayWithCapacity:imgArray.count];
    for (NSDictionary *dict in imgArray) {
        YiDongImgModel *imgModel = [YiDongImgModel modelWithDict:dict];
        [temArray addObject:imgModel];
    }
    model.img = temArray;
    return model;
}

@end
